package com.kyd.push.mq;

import com.kyd.push.model.OrderMqContext;
import com.kyd.push.model.TopicEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * OrderMQService
 *
 * @author kejw on 2018/9/27
 */
//@Component
public class OrderMQService {

	@Autowired
	private static ProducerSend producerSend;

	/**
	 * 接单
	 * @param context
	 */
	public void take(OrderMqContext context) {
		ProduceRequest<OrderMqContext> request = new ProduceRequest<>(TopicEnum.TAKE.value(), "TagA", context);
		producerSend.send(request);
	}

}

